import request from '@/utils/request'

export default {
  //查询图书
  getPageBookList(pagination) {
    return request({
      url: "/book/list",
      method: "get",
      params: pagination
    })
  },
  //删除图书
  deleteBook(id) {
    return request({
      url: "/book/delete",
      method: "post",
      params: {id}
    })
  },
  //更新图书信息
  updateBook(data) {
    return request({
      url: "/book/update",
      method: "post",
      data
    })
  },
  //添加图书
  addBook(data) {
    return request({
      url: '/book/add',
      method: 'post',
      data
    })
  },
  //根据id查询图书
  selectBookById(id) {
    return request({
      url: "/book/selectById",
      method: "get",
      params: {id}
    })
  }
}
